package com.campus.server.service;


import com.campus.common.vo.TeacherRequest;
import com.campus.common.vo.Teacher;
import com.campus.server.dao.TeacherAccountManagementDao;
import com.campus.server.dao.TeacherDao;

import java.util.List;

public class TeacherService {

    private TeacherDao teacherDao=new TeacherDao();
    private TeacherAccountManagementDao teacherAccountManagementDao=new TeacherAccountManagementDao();
    public boolean register(String username, String password, Teacher teacher) {
        return teacherDao.isRegister(username,password,teacher);
    }

    public boolean addTeacherRequest(String teacherId,String contactInfo,String oldContactInfo){
        return teacherDao.addTeacherRequest(teacherId,contactInfo,oldContactInfo);
    }
    public boolean deleteTeacherRequest(String teacherId,String contactInfo){
        return teacherDao.deleteTeacherRequest(teacherId,contactInfo);
    }
    public Teacher getTeacherById(String teacherId) {return teacherAccountManagementDao.getTeacherById(teacherId);}
    public List<TeacherRequest> listRequests() {
        return teacherDao.listTeacherRequests();
    }
    public boolean upDateTeacher(String teacherId,String contactInfo){
        return teacherDao.updateTeacher(teacherId,contactInfo);
    }
}